package com.yusys.jin.blog.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpSession;

import com.yusys.jin.blog.entity.commonEntity.District;
import com.yusys.jin.blog.entity.commonEntity.ServerArea;
import com.yusys.jin.blog.entity.commonEntity.ServerServer;
import com.yusys.jin.blog.ex.InsertException;
import com.yusys.jin.blog.ex.SendTooFastException;

public interface ICommonService {
    /**
     * 获取邮件验证码
     *
     * @param to      发送验证码生成后发往何处
     * @param session
     * @throws SendTooFastException
     * @throws InsertException
     */
    void getMailCode(String to, HttpSession session) throws SendTooFastException, InsertException;

    /**
     * 查询所有大区
     *
     * @return
     */
    List<ServerArea> getAreas();

    /**
     * 查询服务器
     *
     * @param AreaId
     * @return
     */
    List<ServerServer> getServers(Integer AreaId);

    /**
     * 获取全国地区名称
     *
     * @param parentId
     * @return
     */
    List<District> getDistrict(Integer parentId);

    /**
     * 获取主页上二级菜单
     *
     * @param id
     * @return
     */

    Map<Integer, String> getMenus(Integer id);
}
